

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>查看认证</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  <link rel="stylesheet" href="../../layuiadmin/layui/css/layui.css" media="all">
  <link rel="stylesheet" href="../../layuiadmin/style/admin.css" media="all">
  <link rel="stylesheet" href="../../layuiadmin/style/template.css" media="all">
</head>
<body>


<div class="layui-fluid layadmin-cmdlist-fluid">
  <div class="layui-row layui-col-space30">
      <div class="layui-col-md2 layui-col-sm4">
          <div class="cmdlist-container">
              <a href="javascript:;">
                  <img src="{$certificate_img}">
              </a>
              <a href="javascript:;">
                  <div class="cmdlist-text">
                      <p class="info">奖励证书</p>
                  </div>
              </a>
          </div>
      </div>
      <div class="layui-col-md2 layui-col-sm4">
          <div class="cmdlist-container">
              <a href="javascript:;">
                  <img src="{$company_img}">
              </a>
              <a href="javascript:;">
                  <div class="cmdlist-text">
                      <p class="info">相关单位证明</p>
                  </div>
              </a>
          </div>
      </div>
      <div class="layui-col-md12 layui-col-sm12">
              <div class="layui-form-item">
                  <label class="layui-form-label">在线鉴宝</label>
                  <div class="layui-input-inline">
                      <input type="number" name="price" id="price"  lay-verify="required" placeholder="请输入在线鉴宝价格" autocomplete="off" class="layui-input">
                  </div>
              </div>
              <div class="layui-form-item">
                  <label class="layui-form-label">面对面鉴宝</label>
                  <div class="layui-input-inline">
                      <input type="number" name="face_price" id="face_price" lay-verify="required" placeholder="请输入面对面鉴宝价格" autocomplete="off" class="layui-input">
                  </div>
              </div>
              <div class="layui-form-item">
                  <div class="layui-input-block">
                      <button class="layui-btn" onclick="agree()">同意</button>
                      <button class="layui-btn layui-btn-primary" onclick="refuse()">拒绝</button>
                  </div>
              </div>
      </div>
  </div>
</div>


  <script src="../../layuiadmin/layui/layui.js"></script>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
  <script>
  layui.config({
    base: '../../layuiadmin/' //静态资源所在路径
  }).extend({
    index: 'lib/index' //主入口模块
  }).use(['index']);
  layui.use(['laypage', 'layer'], function(){
  var laypage = layui.laypage
  ,layer = layui.layer;
  
  //总页数低于页码总数
  laypage.render({
    elem: 'demo0'
    ,count: 50 //数据总数
  });
});
  //同意
  function agree(){
      var price =$("#price").val();
      var face_price = $("#face_price").val();
      $.ajax({
       url: "{:url('user/expert_look')}",
       data: {cost: price,face_cost: face_price},
       type: 'post',
       dataType: 'json',
       success: function (data) {
       if(data.code==200){
       layer.msg('已同意');
           window.location.href = '{:url(\'user/lists\')}';
       }
       }
       })
  }
  //拒绝
  function refuse(){
      $.ajax({
          url: "{:url('user/look_pic')}",
          data: {refuse: true},
          type: 'post',
          dataType: 'json',
          success: function (data) {
              if(data.code==200){
                  layer.msg('已拒绝');
                  window.location.href = '{:url(\'user/lists\')}';
              }
          }
      })
  }

  </script>
</body>
</html>